<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旺财5号---轮播图</title>
    <link rel="icon" href="../imges/big_wc.ico" type="image/x-icon" />
    <script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.1.1/jquery.min.js"></script>
    <script src="../bootStrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../bootStrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../css/my.css" />
    <style>
        body {
            /* 消除my.css全局样式影响 */
            padding-top: 0px;
        }

        .myBtn:hover {
            background-color: pink;

        }

        .myBtn:focus {
            border-bottom: 5px solid skyblue;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 轮播图 -->
        <h3>轮播图</h3>
        <div style="width: 100%;">
            <div style="width: 80%;margin: 0 auto;">
                <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                    <!-- Indicators -->
                    <ol class="carousel-indicators">
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
                    </ol>
                    <!-- Wrapper for slides -->
                    <div class="carousel-inner" role="listbox">
                        <div class="item active">
                            <img src="../imges/dog1.jpg" style="width: 100%;height: 600px;">
                            <div class="carousel-caption">
                                11111111
                            </div>
                        </div>
                        <div class="item">
                            <img src="../imges/dog2.jpg" style="width: 100%;height: 600px;">
                            <div class="carousel-caption">
                                22222222
                            </div>
                        </div>
                        <div class="item">
                            <img src="../imges/dog3.jpg" style="width: 100%;height: 600px;">
                            <div class="carousel-caption">
                                333333
                            </div>
                        </div>
                        <div class="item">
                            <img src="../imges/dog4.jpg" style="width: 100%;height: 600px;">
                            <div class="carousel-caption">
                                4444
                            </div>
                        </div>
                    </div>

                    <!-- Controls -->
                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>

                    </a>
                </div>
            </div>
        </div>

        <a href="javascript:void(0);" id="myHref">location.href</a>

        <!-- 固钉 -->
        <h3>固钉</h3>
        <div data-spy="affix" data-offset-top="60" data-offset-bottom="200">
            我是固钉
        </div>

        <div style="background-color: pink;width: 100%;height: 300px;">
        </div>

    </div>
</body>

<script>
    $(() => {
        $('#myHref').click(() => {
            // 小记：window.location.href用于当前页面跳转
            window.location.href = 'https://www.baidu.com/';
        })
    });
</script>

</html>